{extend name="common/base" /}
{block name="main"}
<style>
    /*分页样式*/
    .pagination li{margin:0px 1px; padding: 1px 1px;display: inline-block;}
    .pagination .active span{ background-color: #1E9FFF; color: #fff;}
</style>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 15px;">
    <legend>银行列表</legend>
    <div style="margin-top: 10px">
        <div class="demoTable">
        <button class="layui-btn" style="float:left" onclick="location.href='{:url(\'create\')}'">添加银行</button>
        <form action="" method="get" style="margin: 0 130px ">
            &nbsp;搜索银行：
            <div class="layui-inline">
                <input class="layui-input" name="name" id="name" autocomplete="off">
            </div>
            &nbsp;搜索简称：
            <div class="layui-inline">
                <input class="layui-input" name="abbr" id="abbr" autocomplete="off">
            </div>
            <button class="layui-btn layui-btn-normal" data-type="reload">搜索</button>
        </form>
        </div>
    </div>

</fieldset>

<table class="layui-table">
    <thead>
    <tr>
        <th>ID</th>
        <th>银行</th>
        <th>简称</th>
        <th>角色</th>
        <th>状态</th>
        <th>添加时间</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    {volist name="list" id="vo"}
    <tr>
        <td>{$vo.id}</td>
        <td>{$vo.bank_name}</td>
        <td>{$vo.bank_abbr}</td>
        <td>管理组</td>
        <td>正常</td>
        <td>{$vo.create_time|date="Y-m-d"}</td>
        <td>
            <a href="{:url('edit',array('id'=>$vo['id']))}" class="layui-btn layui-btn-xs">编辑</a>
            <a href="{:url('delete',array('id'=>$vo['id']))}" class="layui-btn layui-btn-danger layui-btn-xs" onclick="return confirm('确定删除？')">删除</a>
        </td>
    </tr>
    {/volist}
    </tbody>
</table>
注：列表按数据变更时间排序，最新修改的数据排在前面
<div class="pages"><div class="layui-box layui-laypage layui-laypage-default" id="layui-laypage-1">{$list|raw}</div></div>
{/block}
